//
//  AppCameraManager.m
//  YYDemo
//
//  Created by lipeng on 2019/4/21.
//  Copyright © 2019 lipeng. All rights reserved.
//

#import "AppCameraManager.h"
#import "AppAuthManager.h"
@interface AppCameraManager ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
@property (nonatomic,strong) UIImagePickerController *imagePickerController;
@end

@implementation AppCameraManager

- (UIImagePickerController *)imagePickerController {
    if (_imagePickerController == nil){
        _imagePickerController = [[UIImagePickerController alloc] init];
        _imagePickerController.delegate = self;
    }
    return _imagePickerController;
}


- (UIImagePickerController *)showImagePickerVCBySouceType:(UIImagePickerControllerSourceType)sourceType {
    if ([[AppAuthManager sharedAppAuthManager] checkPhotoLibraryPermissions]) {
        self.imagePickerController.sourceType = sourceType;
    }
    return self.imagePickerController;
}

#pragma mark - UIImagePickerControllerDelegate

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<UIImagePickerControllerInfoKey,id> *)info {
    
    
}

- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
    
}


@end
